<?php
echo $form->create(array(
	'id'		=> 'frm',
	'action'	=> 'edit',
	'enctype'	=> 'multipart/form-data',
));
?>  
    <!--
    <div class="input">
      <label><?php echo __('Name', true); ?></label>
      <?php echo $this->Form->input('Product.name_eng', array('type' => 'text', 'label' => false, 'div' => false)); ?>
  	</div>
    -->
    <div class="input">
      <label><?php echo __('Name', true); ?></label>
      <?php echo $this->Form->input('Product.name_vie', array('type' => 'text', 'label' => false, 'div' => false)); ?>
  	</div>
 	<div class="input">
		<label>Category Parent</label>
		<?php
     				echo $form->input(
					'Product.type',
					array(
						'type'		=> 'select',
						'label'		=> false,
						'div'		=> false,
						'options'	=> $categories,
						'default'   => $parent
					)
				);
				?>
   	</div>
   	<div class="input">
		<label>Image file(<300kb)</label>
		<?php if(!empty($this->data['Product']['img'])) { ?>
			<img src="<?php echo IMG_URL .'/products/'. $this->data['Product']['img']; ?>" width="60px" />
		<?php } ?>
		<?php
			echo $form->input(
				'Product.img',
				array(
					'type'		=> 'file',
					'label'		=> false,
					'div'		=> false,
					'name'		=> 'upload'
				)
			);
		?>
   	</div>
	<div class="input">
      <label><?php echo __('Giá', true); ?></label>
      <?php echo $this->Form->input('Product.price', array('type' => 'text', 'label' => false, 'div' => false)); ?>
  	</div>
    <div class="input">
        <label><?php echo __('ĐVT', true); ?></label>
      <?php echo $this->Form->input('Product.unit', array('type' => 'text', 'label' => false, 'div' => false)); ?>
  	</div>
	<div class="input">
      <label><?php echo __('Description', true); ?></label>
      <?php echo $this->Form->input('Product.description_vie', array('type' => 'text', 'label' => false, 'div' => false)); ?>
  	</div>
        <div class="input">
      <label><?php echo __('Giảm giá', true); ?></label>
      <?php echo $this->Form->input('Product.discount_price', array('type' => 'text', 'label' => false, 'div' => false)); ?>
  	</div>
	<div class="input">
            <label><?php echo __('Hết hàng', true); ?></label>
            <?php echo $this->Form->input('Product.sold', array('type' => 'checkbox', 'label' => false, 'div' => false)); ?>
  	</div>
	<div class="input" align="center" >
      <?php echo $form->button('', array('class'=>'submit', 'type'=>'submit', 'id'=>'regSubmit')); ?>
     	<?php echo $form->button('', array('class'=>'reset', 'type'=>'reset')); ?>
    </div>
    <?php echo $form->hidden('Product.id'); ?>
<?php echo $form->end(); ?>
